version 15      // Stata version control

clear all          // clear memory

macro drop _all    // delete all macros

set linesize 82    // result window has room for 82 chars in one line

set more off, perm // prevents pause in results windowversion 12

*********set global paths


/*instructions:
*set up folder structure including a data, tables, and figure folder
*insert dataset "Contract_Coverage.dta" into "data" folder

*specify globals for paths

global path1 "YOUR_FOLDER_PATH/data"

global path2 "YOUR_FOLDER_PATH/tables"

global path3 "YOUR_FOLDER_PATH/figures"

*from here on the do-file should produce the results and put them in the respective folders


***load data */



use $path1/Contract_Coverage.dta, clear


drop if Year<1995

graph twoway (line w_secperc Year, lpattern(solid) lcolor(black)) ///
	(line w_firmperc Year, lpattern(dash) lcolor(black)) ///
	(line  w_noneperc Year, lpattern(shortdash) lcolor(black)), ///
	ytitle("Participation (%)", color(black) size(small)) ///
	xtitle("") 	ylabel(,labsize(small)) ///
	xscale(range(1995 2007)) xlabel(1995 (2) 2007,labsize(small))  ///
	plotregion(style(none))  ///                                   
	graphregion(fc(white) lc(white)) ///
	legend(order(1 "Industry-level" 2 "Firm-level" 2 "No Contract") col(3) row(1) size(small)) ///
	saving($path3/figure_germany.gph, replace)
	
graph export $path3/figure_germany.pdf, replace
graph export $path3/figure_germany.tif, replace


